home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d891.lha / Skew / ReadMe next >
Text File  |  1993-07-04  |  9KB  |  203 lines

  1.  
  2.                    --- ReadMe for Skew v1.28 ---
  3.  
  4.  
  5. Sorry, this is no AmigaGuide file. This is too humble a program for such
  6. luxuries (while I'm too lazy...).
  7.  
  8. I wrote (the first version of) this program back in 1991 because:
  9.  
  10.     1. I wanted to learn something about the new Amiga gadgetry (and
  11.        request'ry).
  12.  
  13.     2. Nobody else did. (Now, i.e. in 1993, the GadToolsBox can generate
  14.        IDCMP-handling stuff, which, in all probability is much smarter
  15.        (though I have never tried it myself).
  16.  
  17. Current version of Skew, namely 1.28, dates from July 1993. This long life,
  18. does not mean that I worked with this proggy very much. But it seems to be
  19. O.K. at last, and useful to me if nobody else...
  20.  
  21. "Skew" (the name stands for "SKEleton Writer") is a tool for generating C
  22. code for various Intuition based applications on the Amiga. You click the
  23. mouse and the code gets written. There are already a couple of such programs
  24. -- Jan van den Baard's "PowerSource" and "GadToolsBox" (this latter was, by
  25. the way, intensively used by myself while writing Skew), Matt Dillon's
  26. "TplEdit" etc. They generate code for screens, windows, gadgets, menues and
  27. so on; being even capable of creating (with some your help) a wholly runnable
  28. program. If so -- why would I need this stuff, you're asking?
  29.  
  30. Skew's domain is slightly different: it WON'T create any runnable program by
  31. itself, but for a cost of twenty or fifty mouse clicks, it CAN save you
  32. typing some hundred lines of C code. More -- in most cases you would be
  33. typing with only one finger holding some interesting but not very handy book
  34. like the "Amiga ROM Kernel Reference Manual" with other hand...
  35.  
  36. All the great programs I mentioned earlier WILL write you a complete code you
  37. can compile and run; the resulting programs WILL have beautiful gadgets,
  38. menues etc. but -- if you want to have a prrogram that really DOES something
  39. non-trivial -- you will still have to write the code for the IDCMP handling
  40. yourself and merge it with the (machine-generated or not) code. Much typing
  41. is involved here if your application is more or less sophisticated.
  42.  
  43. Enter "Skew" and what it does? Well, it generates a function (named by
  44. default) GetIDCMP() with the pertaining switch and cases for the various
  45. Class'es in IntuiMessage; as well as some other related stuff. If one
  46. consideres that there is 26 such classes now and they all have long, all-
  47. uppercase names it might seem strange that nobody got the idea of any
  48. automatization here...
  49.  
  50. When you start the program you see a screen with a couple of gadgets and a
  51. logo. The purpose of the gadgets in the lowest row should be rather obvious.
  52. In the string gadget you can place the name of the IDCMPWindow (which can be
  53. a requester).
  54.  
  55. Then you have a check-button which you check if you are going to use
  56. GadTools.library.
  57.  
  58. The other gadgets: the check-buttons with "Class", "Code", "Qualifier" etc.
  59. written by them are the names of the fields in IntuiMessage you are
  60. interested in. "Class" is pre-set because: firstly -- it is so often needed,
  61. secondly -- you would not get much of this program if you do not want them.
  62. However, even if you turn "Class" off, you will get this variable read by the
  63. resulting code, if any of the flag values on the next 'screen' (backdrop
  64. window actually) is set, and "Skew" sees that you will need it after all. So
  65. wise it is -- sheer IA!! And you always will be able, of course, to return
  66. whenever you wish to change the settings or just see them.
  67.  
  68. Then you will go to the second 'screen' with the groups of check-button
  69. gadgets in groups of two, in addition to the big (and obvious) ones at the
  70. bottom. One of such pair has i.e. "MOUSEBUTTONS" inscribed to its left, while
  71. the other has "F". Now -- if you set ANY of them ON, you will get a case for
  72. MOUSEBUTTONS in the generated switch, if you set this with "F" ON (no matter
  73. what is the state of the other one!) -- you will get a function call in this
  74. case. It is something like that:
  75.  
  76.     without "F":
  77.  
  78.             switch ( class ) {
  79.  
  80.                 ...                     <--- previous case's (if any)
  81.  
  82.                 case MOUSEBUTTONS:
  83.                                         <--- place for your code
  84.                     break;
  85.  
  86.                 ...                     <--- more cases
  87.  
  88.     with "F":
  89.  
  90.             switch ( class ) {
  91.  
  92.                 ...                     <--- previous case's (if any)
  93.  
  94.                 case MOUSEBUTTONS:
  95.                     MouseButtons();
  96.                     break;
  97.  
  98.                 ...                     <--- more cases
  99.  
  100.  
  101. Now, the MouseButtons() might be called something like
  102. HandleMouseButtons123(); and you may even get its prototype (ANSI-style), as
  103. well as a 'skeleton' -- see below.
  104.  
  105. When (if?) you reach the third 'screen' we can set some general options like:
  106.  
  107.     1. The name for the GetIDCMP() function in case you do not like this
  108.        name, or, for example, need stuff like GetIDCMP1(), GetIDCMP2(), ...
  109.        GetIDCMP25(). A string gadget.
  110.  
  111.     2. Prefix and suffix for the generated 'child functions' so that, for
  112.        instance, MouseButtons() becomes my_new_MouseButtons_turbo(). Two
  113.        string gadgets for that.
  114.  
  115.     3. Whether you will want function prototypes. A cycle gadget.
  116.  
  117.     4. If you will want function 'skeletons' in the form more or less like:
  118.  
  119. VOID MouseButtons( VOID )
  120. {
  121.  
  122. }
  123.  
  124. or
  125.  
  126. MouseButtons()
  127. {
  128.  
  129. }
  130.  
  131.     5. A cycle-gadget with which you decide if you want to passively
  132.        wait for the messages, or maybe you will need to spin and do something
  133.        like i.e. printing a banner (or something much more ambitious) in the
  134.        meantime. The place the code for that should be placed will be marked
  135.        if you set the "comments" and/or "fill-ins" flag on.
  136.  
  137.     6. A cycle-gadget with which you decide if the variables should be local
  138.        or global. It might be much easier to use globals, but you know,
  139.        globals are 'impure' they say...
  140.  
  141.     7. Do you want verbose comments, some comments or none at all? The
  142.        comments are really not very enlighting, and the difference between
  143.        "verbose" and "sparse" in not great. I simply got tired of inventing
  144.        them...
  145.  
  146.     8. Fill-ins, also a cycle-gadget. You decide whether you want the
  147.        places where you will have to put something marked with '@@',
  148.        '/* @@ */', '@@@@@@@@@@', or not marked at all. The idea is here that
  149.        should be easy to find the '@@' from an editor, but you might want
  150.        them commented-out if you are trying to compile an un-finished code.
  151.        The '@@@@@@@@@@' shoud be easy to spot with bare eye, if you for
  152.        instance want to see how much you will need to type yourself. Most of
  153.        the places to fill in will be marked, but not necessarily all -- if
  154.        you do something more with a function than only call it there WILL be
  155.        slightly more.
  156.  
  157.     9. The test-variable ('Done' or so) can be either global or local. A
  158.        cycle-gadget for that.
  159.  
  160.     10. The 'top-level' GetIDCMP() function can return LONG, as well as take
  161.         pointer to the IDCMP window as parameter. Two cycle-gadgets for that.
  162.  
  163. There may still be some gadget I forgot, but id should not be hard to figure
  164. out what it will do...
  165.  
  166. Since version 1.26, Skew can be 'iconified'; it uses a UEdit-style 'tiny
  167. window' pseudo-icon; it can be shifted around, remembers when you left it
  168. lately. To return from the 'iconification' you click on the tiny window below
  169. the bar.
  170.  
  171.  
  172. SOME FINAL REMARKS:
  173.  
  174. "Skew" is for 2.0 and up only. It's 'pure'. It is writted on and for PAL
  175. monitor and such display it will try to use, but if your chips are not up to
  176. that -- will try open on an interlaced NTSC screen.
  177.  
  178. "Skew" likes every 'arp-and-asl-to-a-much-fancier-filerequestor' program I
  179. ever found, with the one exception: a program called 'fr_Bypass'.
  180.  
  181. "Skew" will let you type stupid names in the string gadgets and do many other
  182. things like that; you will be able to correct all this later, in your editor.
  183. The code generated is in extremely loose format that you might hate, but
  184. which I like more and more...
  185.  
  186. "Skew" is Public Domain, the source is included. It compiles cleanly with
  187. DICE 2.6 (registered version); much of the code for the screen, window &
  188. gadgets was generated by GadToolsBox (but it was back in 1991, since then it
  189. has been being re-written by hand).
  190.  
  191. By the way -- the source has tab-stops every 4 spaces.
  192.  
  193.  
  194.                                     Piotr Obminski
  195.  
  196.                                     Flogstavägen 43C:323
  197.  
  198.                                     752 63 UPPSALA
  199.  
  200.                                         SWEDEN
  201.  
  202.                                     tel. 018 - 46 38 32
  203.